package com.love.marriage.userPartnerPreferences.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.love.marriage.common.interfaces.permission.DataPermission;
import com.love.marriage.userPartnerPreferences.entity.UserPartnerPreferences;
import com.love.marriage.userPartnerPreferences.vo.UserPartnerPreferencesVo;
import com.love.marriage.userPartnerPreferences.vo.UserPartnerVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * description:  用户择偶要求表 mapper
 * author:       mybatisPlus
 * createDate:   2024-10-29 22:13:42
 * version:      1.0.0
 */
@Mapper
public interface UserPartnerPreferencesMapper extends BaseMapper<UserPartnerPreferences> {

    @DataPermission(table = "user_partner_preferences_t")
    Page<UserPartnerPreferencesVo> getPage(Page<UserPartnerPreferencesVo> page, @Param("userPartnerPreferencesVo") UserPartnerPreferencesVo userPartnerPreferencesVo);

    UserPartnerPreferencesVo queryUserPartnerPreferences(@Param("id") Long id);

    UserPartnerPreferencesVo queryUserPartnerPreferencesByUserId(@Param("userId") Long userId);

    List<UserPartnerVo> selectPartnerInfo(@Param("userId") Long userId,
                                          @Param("gender") String gender);

    List<UserPartnerVo> selectPartnerInfoWithMinScore(@Param("userId") Long userId,
                                                      @Param("gender") String gender,
                                                      @Param("minScore") Integer minScore);
}
